package org.papervision3d.materials
{
    import org.papervision3d.core.proto.MaterialObject3D;

    // The ColorMaterial class creates a solid color material.
    // Materials collects data about how objects appear when rendered.
    public class ColorMaterial extends MaterialObject3D
    {
        // The ColorMaterial class creates a solid color material.
        // @param    asset               A BitmapData object.
        // @param    initObject          [optional] - An object that contains additional properties with which to populate the newly created material.
        public function ColorMaterial(color:Number = 0xFF00FF, alpha:Number = 100, initObject:Object = null)
        {
            super(initObject);
    
            this.fillColor = color;
            this.fillAlpha = alpha;
        }
    
        // Returns a string value representing the material properties in the specified ColorMaterial object.
        // @return   A string.
        public override function toString():String
        {
            return 'ColorMaterial - color:' + this.fillColor + ' alpha:' + this.fillAlpha;
        }
    }
}
